#list
#cteate
list_1 = ["ddd"]
list_1.append("adsd")
print(list_1)


#+和+=
l_1 = ["a"]
l_2 = ["b"]
l_3 = l_1 + l_2
print(l_3)
l_3 += ["333"]
print(l_3)


#*
l_4 = ["444"] * 3
print(l_4)


#insert
name = ["333"]
name.insert(0, "444")
print(name)


#Retrieve
name1 = ["qq", "ww"]
print(name1[1])


#切片
l = list(range(100))
print(l[0:10])
print(l[20:30])
print(l[0:-1])
print(l[-1])
print(l[20:0])
print(l[1:45:3])


#index
m = ["qq", "ee"]
print(m.index("ee"))
m.insert(m.index("ee"), "dd")
print(m)


#Update
#索引赋值
m[0] = "aa"
print(m)


#切片赋值
l4 = list(range(50))
l4[0:8] = "d"
print(l4)


#pop
m_2 = list(range(30))
print(m_2.pop())


#clear
m_2.clear()
print(m_2)


#SORT
l_0 = [1, 5, 3, 2]
l_0.sort()
print(l_0)


#sorted
l_88 = [5, 4, 3, 2]
print(sorted(l_88))


#reverse
l_88.reverse()
print(l_88)


#reversed
print(list(reversed(l_88)))